package ptaweek1;

import java.util.Scanner;

public class topic03{

	public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
        
        int sum = 0,i,j;
        while(true){
         String s=sc.nextLine();
         for (i = 0; i < s.length(); i++) {
            if (Character.isDigit(s.charAt(i))) {
            	j=Integer.parseInt(s.charAt(i)+"");
            	sum=sum+j;
            }
        }
        System.out.println(sum);
        sum=0;
    }
}
}
